import { Component, OnInit, Input, Output, EventEmitter } from "@angular/core";
import { DomSanitizer, SafeResourceUrl } from "@angular/platform-browser";

@Component({
  selector: "v-modal",
  templateUrl: "v-modal.component.html",
  styleUrls: ["v-modal.component.less"]
})
export class VModalComponent implements OnInit {
  @Input() url;
  @Output() setModal = new EventEmitter();
  showVideo: string;

  constructor(private sanitizer: DomSanitizer,) {
  }
  ngOnInit() {
    this.url = this.sanitizer.bypassSecurityTrustResourceUrl(this.url);     // 处理url
  }

  getMouseOver() {

  }

  changeModal(action: string) {
    this.setModal.emit(action);
  }
}